Page({
  data: {
  //轮播图
  swiperCurrent:1,
  arr: [{
  images: 'images/1.jpg'
  },
  {
  images: 'images/2.jpg'
  },
  {
  images: 'images/3.jpg'
  },
  {
  images: 'images/4.jpg'
  }
  ],
  indicatorDots: true,
  autoplay: true,
  interval: 2000,
  duration: 1000,
  circular: true,
  beforeColor: "white",//指示点颜色 
  afterColor: "coral",//当前选中的指示点颜色 
  previousmargin:'50px',//前边距
  nextmargin:'50px',//后边距
  
  },
  
  //轮播图的切换事件 
  swiperChange: function (e) {
  console.log(e.detail.current);
  this.setData({
  swiperCurrent: e.detail.current //获取当前轮播图片的下标
  })
  },
  //滑动图片切换 
  chuangEvent: function (e) { 
  this.setData({
  swiperCurrent: e.currentTarget.id
  })
  },
 })
 